package com.ruoyi.logistic.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.logistic.domain.NetworkTransferMoney;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.PageInfo;
import com.ruoyi.logistic.domain.vo.NetworkTransferMoneyVo;
import com.ruoyi.logistic.service.INetworkTransferMoneyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/network/transferMoney")
@RestController
@Api(tags = "网点财务_出港发件费结算_承包区中转费汇总")
public class NetworkTransferMoneyController {
    @Autowired
    private INetworkTransferMoneyService networkTransferMoneyService;

    @ApiOperation("搜索承包区中转费汇总列表")
    @PostMapping("/search")
    public R search(@RequestBody @Param("networkTransferMoneyVo")NetworkTransferMoneyVo networkTransferMoneyVo){
        List<NetworkTransferMoney> networkTransferMonies = networkTransferMoneyService.search(networkTransferMoneyVo);
        if (networkTransferMonies == null || networkTransferMonies.size() == 0){
            return R.fail("暂无数据");
        }else {
            return R.ok(PageInfo.info(networkTransferMonies));
        }
    }
}
